package com.fourhats.model;

import java.sql.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="price")
public class Price extends com.fourhats.model.Entity {
	
	@Column(name="value")
	private Double value;
	
	@ManyToOne
    @JoinColumn(name="itemId")
	private Item item;
	
	@ManyToOne
    @JoinColumn(name="placeId")
	private Place place;
	
	@Column(name="creationDate")
	private java.util.Date creationDate;
	
	@Column(name="enable")
	private boolean enable;
	
	public Price(){
		
	}
	
	public Price(Item item, Place place, Double value){
		this.item = item;
		this.place = place;
		this.value = value;
		this.creationDate = new java.util.Date();
		this.enable = true;
	}
	
	public Double getValue() {
		return value;
	}

	public void setValue(Double value) {
		this.value = value;
	}

	public Item getItem() {
		return item;
	}

	public void setItem(Item item) {
		this.item = item;
	}
	
	public Place getPlace() {
		return place;
	}
	
	public void setPlace(Place place) {
		this.place = place;
	}

	public java.util.Date getCreationDate() {
		return creationDate;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}

	public boolean isEnable() {
		return enable;
	}

	public void setEnable(boolean enable) {
		this.enable = enable;
	}
}
